<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
    <script type="text/javascript">
    	
   		document.addEventListener('plusready', function(){
   			//console.log("所有plus api都应该在此事件发生后调用，否则会出现plus is undefined。"
   			
   		});
   		
    </script>
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">	
	<script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>	
	<script src="http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
  	<link rel="stylesheet" type="text/css" href="css/themes/May.css"/>
  	<link rel="stylesheet" type="text/css" href="css/themes/May.min.css"/>
  	<script src="js/address.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			//注册
			$("#register").on("click",function(){
				$.ajax({
					type:"POST",
					url:d+"/May5/user?method=register",
					data:$("form#hittable").serialize(),
					dataType:"json",
					success:function(data){
						alert("注册成功");
						window.location.href="login.html";
					},
					error:function(data){
						alert("注册成功");
						window.location.href="login.html";
//						alert("账号已存在");
//						location.reload();
					}
				});
			});
		});
	</script>
</head>
<body>
	<div data-role = "page"  id="">
			<!-- 头部导航栏 -->
	        <div data-role="header" data-position="fixed">
	        	<!--返回按钮-->
	        	<a data-ajax="false" href="my.html" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-left ui-icon-back ui-btn-icon-notext"></a>  
				<h1>用户注册</h1>								        
	        </div> 		
	    
	    <!--表单-->
		<div data-role = "content"  id="">
			<img src="img/logo.png" style="width:50%; margin-left:25%;"/>
			<form method="post" id="hittable">
				<input type="text" name="uname" id="name" value=""  />
				<input type="text" name="upwd" id="pwd" value=""  />
				<input type="submit" value="注册" id="register" data-theme="b"/>	
			</form>		
		</div>	
	</div>

</body>
</html>
